.cp__page {
  &-publish-actions {
    background-color: var(--ls-primary-background-color);
    padding: 50px 0;
    margin: -1.5rem;

    > h1 {
      font-size: 18px;
      padding: 15px;
      text-align: center;
    }

    > .it {
      display: flex;
      justify-content: flex-start;
      padding-top: 5px;
      padding-bottom: 5px;

      button {
        width: 90%;
        justify-content: center;
        padding: 15px 0;
      }
    }
  }
}

.cp__all_pages {
  &_table {
    margin: 0;

    th {
      padding: 4px 5px;
      text-align: center;
      user-select: none;

      a {
        font-weight: bold;

        > span {
          justify-content: center;
        }
      }

      &.name {
        a > span {
          justify-content: left;
        }
      }

      &.backlinks {
        width: 120px;
      }

      &.created-at, &.updated-at {
        width: 150px;
      }
    }

    td {
      text-align: center;
      padding: 3px;

      &.name {
        text-align: left;
      }

      &:nth-child(1) {
        cursor: pointer;
      }

      > span {
        @apply text-sm py-1.5 px-2;
      }
    }

    .selector {
      width: 40px;

      input {
        cursor: pointer;
      }

      label {
        display: flex;
        justify-content: center;
        width: 100%;
        padding: 10px 0;
        cursor: pointer;
      }
    }
  }

  .actions {
    position: sticky;
    background-color: var(--lx-gray-01, var(--ls-primary-background-color, var(--rx-gray-01)));
    white-space: nowrap;
    top: -18px;
    padding-bottom: 10px;
    z-index: 1;

    .dark & {
        background-color: var(--lx-gray-02, var(--ls-primary-background-color, var(--rx-gray-02)));
    }

    @screen md {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .ui__button {
      margin: 0;
    }

    i:is(.ti, .tie) {
      font-size: 16px;
      display: inline-block;
      position: relative;
      transform: none;
    }

    .l {
      .actions-wrap {
        button {
          opacity: .5;
          pointer-events: none;
        }
      }
    }

    .r {
      @apply text-base space-x-2;

      a.button {
        margin-top: 1px;
        height: unset;
        padding: 4px;
        display: flex;
        align-items: center;

        &.active {
          opacity: 1;
        }
      }

      > div {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 3px;
      }
    }

    &.has-selected {
      .l {
        button {
          opacity: 1;
          pointer-events: unset;
        }
      }
    }

    .search-wrap {
      margin-left: 5px;
      position: relative;

      .ui__button {
        background-color: transparent;
        color: var(--ls-primary-text-color);
        outline: none;
        border: none;
        position: absolute;
        padding-left: 8px;
      }

      .form-input {
        padding: 3px 8px 3px 30px;
      }

      .cancel {
        opacity: .3;
        position: absolute;
        right: 6px;
        top: 6px;

        &:hover {
          opacity: .6;
        }
      }
    }
  }
}

.cp__vertical-menu-button {
  opacity: 60%;
  display: block;
}

.cp__vertical-menu-button:hover {
  opacity: 1;
}

.cp__vertical-menu-button svg {
  width: 20px;
  height: 20px;
}

.graph-filters {
  width: 200px;
  background: var(--ls-secondary-background-color);
}

.graph-filters ul {
  margin-left: 0;
}

.graph-filters li {
  list-style: none;
  margin: 0;
}

.graph-layout {
  background: var(--ls-secondary-background-color);
}

.search-filter-close svg {
  transform: scale(0.7);
}

.ls-page-title {
  @apply rounded-sm;

  padding: 5px 8px;
  margin: 0 -6px;

  &.title {
    margin-bottom: 12px;
  }

  .edit-input {
    @apply w-full border-0 p-0 pr-1 bg-transparent outline-0;

    box-shadow: none;

    &-wrapper {
      @apply rounded;

      &.editing {
        background-color: var(--ls-secondary-background-color);
      }
    }
  }
}

a.page-title {
  padding: 0 8px;
  margin-left: -8px;
  transition: none;
  display: block;
  color: inherit;
}

.page-title-sizer-wrapper {
  @apply w-full overflow-x-auto overflow-y-hidden;

  :empty::before {
    content: '\200b';
  }

  > .title {
    @apply w-full overflow-hidden overflow-ellipsis;
  }
}

html.is-native-android,
html.is-native-ipad,
html.is-native-iphone,
html.is-native-iphone-without-notch {
  .ls-page-title {
    margin: 0 0 10px -15px;
    padding: 0 !important;
  }
}

/* Change to another cursor style if Shift key is active */
[data-active-keystroke*="Shift" i] :is(.journal-title, .page-title,
    .block-ref, .page-ref, a.tag,
    .bullet-container.cursor) {
  cursor: e-resize;
}

.add-button-link {
  opacity: 0;
  color: var(--ls-primary-text-color);
  transform: scale(.8);

  &:hover {
    color: var(--ls-primary-text-color);
    opacity: .6 !important;
    transform: scale(.9);
  }

  &:active {
    opacity: .8 !important;
  }

  &-wrap {
    cursor: pointer;
  }
}

.add-button-link-wrap:focus .add-button-link {
  opacity: .8 !important;
  transform: scale(.9);
}

.cp__right-sidebar .add-button-link {
  margin-left: 21px;
}

html.is-native-android,
html.is-native-ios {
  .cp__all_pages {
    .actions > .r {
      position: relative;
      padding: 15px 10px 25px 0;
      justify-content: space-between;

      .paginates {
        position: absolute;
        top: 40px;
        right: 0;
        width: 100%;
        display: flex;
        justify-content: flex-end;
      }
    }
  }

  .block-content-wrapper {
    /* 38px is the width of block-control */
    width: calc(100% - 35px);
    @screen sm {
      width: calc(100% - 33px);
    }
  }
}

.page-blocks-collapse-control, .page-blocks-collapse-control:hover {
  text-decoration: none;
  cursor: default;
  min-width: 22px;
  padding-top: 22px;
  color: initial;
  user-select: none;

  .control-hide {
    display: none;
  }
}

.toned-down {
  opacity: 0.5;
  color: var(--ls-secondary-text-color);
}

.highlighted {
  opacity: 1;
  color: var(--ls-primary-text-color);
}

.separator-top {
  border-top: 1px solid var(--ls-quaternary-background-color);
}

.icon-box {
  display: inline-block;
  line-height: normal;
  background-color: var(--ls-quaternary-background-color);
}

.references {
  user-select: none;
}
